 <!--
**
**搜索组件封装
****
-->

<template>
  <div class="search">
        <van-search v-model="val" :placeholder="placeholderVal" @search='sub' :disabled='isDisabled' @click="tab" />
        </div>
</template>
<script>
import Vue from 'vue';
import { Search } from 'vant';
Vue.use(Search);
export default {
  name: "index",
  data() {
    return {
        val:''
    };
  },
  props:['placeholderVal','isDisabled'],
  mounted() {
  },
  methods: {
      sub(){
          this.$emit('searchSub',this.val)
      },
      tab(){
            this.$emit('tabSearch')
      }
  },
};
</script>
<style lang="scss">
    .search{
        padding:0 4px;
        .van-search{
            background: transparent;
            .van-search__content{
                background: #fff;
                border-radius: 5px;
            }
        }
    }
</style>
